<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('菜单新增')" />
    <style>
        .menuName{
            max-height: 200px;
            width: 92%;
            display: none;
            position: absolute;
            top:100%;
            z-index: 100;
            border-top: none;
        }
    </style>
</head>
<body>
<div class="container">
    <form class="layui-form mt20" lay-filter="form-menu">
        <input type="hidden" name="parentId" th:value="${menu.menuId}"/>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="required-msg ">*</span>上级菜单：</label>
            <div class="layui-input-block">
                <input class="layui-input min-input readonly" type="text" id="treeName" readonly th:value="${menu.menuName}">
                <div class="eleTree menuName" lay-filter="menuNameTree"></div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="required-msg ">*</span>菜单类型：</label>
            <div class="layui-input-block">
                <input type="radio" name="menuType" value="M" title="目录" checked />
                <input type="radio" name="menuType" value="C" title="菜单"/>
                <input type="radio" name="menuType" value="F" title="按钮"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="required-msg ">*</span>菜单名称：</label>
            <div class="layui-input-block">
                <input class="layui-input min-input" type="text" name="menuName" lay-verify="required" lay-verType="tips" placeholder="" autocomplete="off" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">请求地址：</label>
            <div class="layui-input-block">
                <input class="layui-input min-input" type="text" name="url" placeholder="" autocomplete="off"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">权限标识：</label>
            <div class="layui-input-block">
                <input class="layui-input min-input" type="text" name="perms" placeholder="" autocomplete="off"/>
                <p class="form-tip"><i class="layui-icon layui-icon-tips"></i>控制器中定义的权限标识，如：@RequiresPermissions("")</p>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="required-msg ">*</span>显示排序：</label>
            <div class="layui-input-block">
                <input class="layui-input min-input" type="text" name="orderNum" lay-verify="required|number" lay-verType="tips" placeholder="" autocomplete="off"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">图标：</label>
            <div class="layui-input-block">
                <input class="layui-input min-input" type="text" name="icon" placeholder="" autocomplete="off"/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">菜单状态：</label>
            <div class="layui-input-block">
                <span th:each="dict : ${@dict.getType('sys_show_hide')}">
                    <input type="radio" th:id="${dict.dictCode}" name="visible" th:value="${dict.dictValue}" th:title="${dict.dictLabel}" th:checked="${dict.isDefault == 'Y' ? true : false}" />
                </span>
            </div>
        </div>
        <div class="layui-form-item layui-hide">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="btn-add" id="btn-add">保存</button>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script th:src="@{/js/system/menu_form.js}"></script>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:menu:edit')}]];
</script>
</body>
</html>